<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<html>
<head>
    <title>${style.title} - 教育新闻网</title>
    <link href="${pageContext.request.contextPath}/static/css/bootstrap.min.css" rel="stylesheet">
    <style>
        .style-container {
            max-width: 800px;
            margin: 0 auto;
            padding: 20px;
        }
        .style-title {
            font-size: 2rem;
            font-weight: bold;
            margin-bottom: 1.5rem;
            color: #333;
        }
        .style-meta {
            color: #666;
            margin-bottom: 2rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid #eee;
        }
        .style-image {
            width: 100%;
            max-height: 500px;
            object-fit: cover;
            border-radius: 8px;
            margin-bottom: 2rem;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }
        .style-description {
            line-height: 1.8;
            color: #444;
            font-size: 1.1rem;
            white-space: pre-line;
        }
        .back-link {
            display: inline-block;
            margin-bottom: 1rem;
            color: #666;
            text-decoration: none;
        }
        .back-link:hover {
            color: #333;
        }
    </style>
</head>
<body>
    <!-- 引入头部 -->
    <jsp:include page="/user/common/header.jsp"/>
    
    <div class="style-container">
        <a href="${pageContext.request.contextPath}/user/home" class="back-link">
            <i class="bi bi-arrow-left"></i> 返回首页
        </a>
        
        <h1 class="style-title">${style.title}</h1>
        <div class="style-meta">
            <span>发布时间：<fmt:formatDate value="${style.createTime}" pattern="yyyy-MM-dd HH:mm"/></span>
        </div>
        
        <img src="${pageContext.request.contextPath}/${style.imageUrl}" 
             alt="${style.title}" class="style-image">
        
        <div class="style-description">
            ${style.description}
        </div>
    </div>
    
    <!-- 引入底部 -->
    <jsp:include page="/user/common/footer.jsp"/>
    
    <script src="${pageContext.request.contextPath}/static/js/bootstrap.bundle.min.js"></script>
</body>
</html> 